package com.dxt.controller;

import jakarta.servlet.ServletException;
import jakarta.servlet.annotation.WebServlet;
import jakarta.servlet.http.HttpServlet;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;

import java.io.IOException;

/**
 * BelongProject: deliveryManage
 * BelongPackage: com.dxt.controller
 * Description:
 *
 * @Author 段鑫涛
 * @Create 2025/3/30 22:34
 * @Version 1.0
 */
@WebServlet("/user/logout")
public class UserLogoutController extends HttpServlet {
    @Override
    protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        req.getSession().invalidate();
        resp.sendRedirect("/login.html");
    }
}
